<template>
  <div class="swiper">
    <div class="scroll">
      <slot></slot>
    </div>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        width: 0,
      }
    },
    mounted() {
      let arr = Array.from(document.querySelectorAll(".scroll img"))
      arr.forEach((el) => {
        this.width += el.clientWidth
      })
    },
  }
</script>

<style lang="scss" scoped>
  .swiper {
    width: 100%;
    overflow: hidden;
    .scroll {
      display: flex;
    }
  }
</style>
